package com.interview.ujiuye9;

/**
 * Copyright (C), 2018-2020
 * FileName: Test1
 * Author:   kongfanyu
 * Date:     2020/11/11 15:40
 */
public class Test1 {
    public static void main(String[] args) {
        ProductService productService = new ProductServiceImpl();
        ProxyFactory proxyFactory = new ProxyFactory(productService);
        ProductService proxy = (ProductService) proxyFactory.getProxy();
        //com.sun.proxy.$Proxy0 pp = new com.sun.proxy.$Proxy0();
        System.out.println(proxy.getClass().getName());
        System.out.println("1111111");
        proxy.addProduct();
        proxy.deleteProduct();
    }

    private static void test1() {
        ProductService productService = new ProductServiceImpl();
        productService.addProduct();
        productService.deleteProduct();
    }
}
